Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: dates inconsistent across site #632

Merged
merged 1 commit into from
Dec 11, 2024
Merged

fix: dates inconsistent across site #632

merged 1 commit into from
Dec 11, 2024

Conversation

alexgoff
Copy link
Contributor

After the previous fix for dates to normalize timezones coming from Craft, some dates were inconsistent in different areas of the site.

There were multiple date utilities with duplicate code, and unclear pattern of use. To resolve this, the number of datestring utilities has been condensed down to two: one to generate strings and another to generate objects of parts.

Both utilities go through the same Craft date normalization by default.

@alexgoff alexgoff added the bug Something isn't working label Dec 10, 2024
@alexgoff alexgoff self-assigned this Dec 10, 2024
isCraftDate?: boolean;
}

export const makeDateString = (
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

combination of existing makeDateString and useDateString

@alexgoff alexgoff merged commit 14534e3 into develop Dec 11, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants